<?php
//用于扩展插件的url输出
$extendAppUrlArray = $this->myviewalias()->adminExtendUrlArray();
$extendAppUrlPath  = $this->url('shopfront/default') . DBSHOP_ADMIN_DIR;
?>
<div class="navbar navbar-static-top">
	<div class="navbar-inner">
    	<a href="<?php echo $this->url('adminHomeetutor/default',array('action'=>'index','controller'=>'home')); ?>" class="brand"><?php echo (defined('DBSHOP_ADMIN_COPYRIGHT') ? DBSHOP_ADMIN_COPYRIGHT : 'eTutor'); ?></a>
		<ul class="nav">
<!--            <li class="dropdown --><?php //if($this->myviewalias()->returnNamespace() == 'Analytics\Controller') echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('统计分析'); ?><!-- <b class="caret"></b></a>-->
                <ul class="dropdown-menu">
                    <li <?php if($this->page_type == 'userStats') echo 'class="active"'; ?>><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'userStats')); ?>"><?php echo $this->translate('客户统计'); ?></a></li>
                    <li <?php if($this->page_type == 'usersOrder') echo 'class="active"'; ?>><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'usersOrder')); ?>"><?php echo $this->translate('客户排行'); ?></a></li>
                    <li <?php if($this->page_type == 'orderStats') echo 'class="active"'; ?>><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'orderStats')); ?>"><?php echo $this->translate('订单统计'); ?></a></li>
                    <li <?php if($this->page_type == 'saleStats') echo 'class="active"'; ?>><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'saleStats')); ?>"><?php echo $this->translate('销售概况'); ?></a></li>
                    <li <?php if($this->page_type == 'saleList') echo 'class="active"'; ?>><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'saleList')); ?>"><?php echo $this->translate('销售明细'); ?></a></li>
                    <li <?php if($this->page_type == 'saleOrder') echo 'class="active"'; ?>><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'saleOrder')); ?>"><?php echo $this->translate('销售排行'); ?></a></li>
                    <li <?php if($this->page_type == 'classSaleStats') echo 'class="active"'; ?>><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'classSaleStats')); ?>"><?php echo $this->translate('分类销售分析'); ?></a></li>
                    <?php
                    $shop_tongji_type = $this->frontwebsite()->websiteInfo('shop_tongji_type');
                    $shop_tongji_token= $this->frontwebsite()->websiteInfo('shop_tongji_token');
                    if($shop_tongji_type == 'baidu' and !empty($shop_tongji_token)) { ?>
                        <li><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics')); ?>"><?php echo $this->translate('流量概况'); ?></a></li>
                        <li><a href="<?php echo $this->url('analytics/default', array('controller'=>'Analytics', 'action'=>'trand')); ?>"><?php echo $this->translate('趋势分析'); ?></a></li>
                        <!--li><a href="<?php echo $this->url('analytics/default'); ?>"><?php echo $this->translate('全部来源'); ?></a></li>
                        <li><a href="<?php echo $this->url('analytics/default'); ?>"><?php echo $this->translate('搜索引擎'); ?></a></li>
                        <li><a href="<?php echo $this->url('analytics/default'); ?>"><?php echo $this->translate('搜索词语'); ?></a></li>
                        <li><a href="<?php echo $this->url('analytics/default'); ?>"><?php echo $this->translate('地域分布'); ?></a></li>
                        <li><a href="<?php echo $this->url('analytics/default'); ?>"><?php echo $this->translate('系统环境'); ?></a></li>
                        <li><a href="<?php echo $this->url('analytics/default'); ?>"><?php echo $this->translate('新老访客'); ?></a></li>-->
                    <?php } else { ?>
                    <li><a href="<?php echo $this->url('system/default',array('controller'=>'system')); ?>"><?php echo $this->translate('统计设置'); ?></a></li>
                    <?php } ?>
                    <?php
                    //位于统计分析的扩展插件
                    if(isset($extendAppUrlArray['adminAnalytics']) and !empty($extendAppUrlArray['adminAnalytics'])) {
                        foreach($extendAppUrlArray['adminAnalytics'] as $adminAnalyticsValue) {
                            if(isset($adminAnalyticsValue['sub']) and !empty($adminAnalyticsValue['sub'])) {
                                ?>
                                <li class="dropdown-submenu">
                                    <a href="#"><?php echo $adminAnalyticsValue['name']; ?></a>
                                    <ul class="dropdown-menu">
                                        <?php foreach($adminAnalyticsValue['sub'] as $subadminAnalytics) { ?>
                                            <li><a href="<?php echo $extendAppUrlPath . $subadminAnalytics['url']; ?>"><?php echo $subadminAnalytics['name']; ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?php echo $extendAppUrlPath . $adminAnalyticsValue['url']; ?>"><?php echo $adminAnalyticsValue['name']; ?></a></li>
                                <?php
                            }
                            ?>
                        <?php } } ?>
                </ul>
            </li>

<!--            <li class="dropdown --><?php //if($this->myviewalias()->returnNamespace() == 'Orders\Controller') echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('销售管理'); ?><!-- <b class="caret"></b></a>-->
<!--                <ul class="dropdown-menu">-->
<!--                    <li><a href="--><?php //echo $this->url('orders/default'); ?><!--">--><?php //echo $this->translate('订单管理'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('orders/default', array('action'=>'shiplist', 'controller'=>'Orders')); ?><!--">--><?php //echo $this->translate('发货单'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('orders/default', array('action'=>'paylog', 'controller'=>'Orders')); ?><!--">--><?php //echo $this->translate('支付记录'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('orders/default', array('action'=>'refund', 'controller'=>'Orders')); ?><!--">--><?php //echo $this->translate('退货管理'); ?><!--</a></li>-->
<!--                    --><?php
//                    //位于订单管理的扩展插件
//                    if(isset($extendAppUrlArray['adminOrder']) and !empty($extendAppUrlArray['adminOrder'])) {
//                        foreach($extendAppUrlArray['adminOrder'] as $adminOrderValue) {
//                            if(isset($adminOrderValue['sub']) and !empty($adminOrderValue['sub'])) {
//                                ?>
<!--                                <li class="dropdown-submenu">-->
<!--                                    <a href="#">--><?php //echo $adminOrderValue['name']; ?><!--</a>-->
<!--                                    <ul class="dropdown-menu">-->
<!--                                        --><?php //foreach($adminOrderValue['sub'] as $subadminOrder) { ?>
<!--                                            <li><a href="--><?php //echo $extendAppUrlPath . $subadminOrder['url']; ?><!--">--><?php //echo $subadminOrder['name']; ?><!--</a></li>-->
<!--                                        --><?php //} ?>
<!--                                    </ul>-->
<!--                                </li>-->
<!--                            --><?php //} else { ?>
<!--                                <li><a href="--><?php //echo $extendAppUrlPath . $adminOrderValue['url']; ?><!--">--><?php //echo $adminOrderValue['name']; ?><!--</a></li>-->
<!--                                --><?php
//                            }
//                            ?>
<!--                        --><?php //} } ?>
<!--                </ul>-->
<!--            </li>-->
            <li class="dropdown"><a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo $this->translate('订单列表'); ?> <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li> <a href="<?php echo $this->url('Etutororders/default'); ?>"><?php echo $this->translate('订单管理'); ?></a></li>
                    <li><a href="<?php echo $this->url('Etutororders/default', array('action'=>'refund', 'controller'=>'Etutororders')); ?>"><?php echo $this->translate('退货管理'); ?></a></li>
                </ul>
            </li>

<!--            <li class="dropdown --><?php //if($this->myviewalias()->returnNamespace() == 'Goods\Controller'  and !in_array($this->myviewalias()->returnControllername(),array('Goods\Controller\Coupon', 'Goods\Controller\Promotions'))) echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('商品管理'); ?><!-- <b class="caret"></b></a>-->
<!--            	<ul class="dropdown-menu">-->
<!--                	<li><a href="--><?php //echo $this->url('goods/default',array('controller'=>'goods')); ?><!--">--><?php //echo $this->translate('管理商品'); ?><!--</a></li>-->
<!--                    <li class="dropdown-submenu">-->
<!--                        <a href="#">--><?php //echo $this->translate('管理分类'); ?><!--</a>-->
<!--                        <ul class="dropdown-menu">-->
<!--                            <li><a href="--><?php //echo $this->url('class/default',array('controller'=>'class')); ?><!--">--><?php //echo $this->translate('商品分类'); ?><!--</a></li>-->
<!--                            <li><a href="--><?php //echo $this->url('class/default', array('controller'=>'class', 'action'=>'frontSide')); ?><!--">--><?php //echo $this->translate('前台侧边设置'); ?><!--</a></li>-->
<!--                        </ul>-->
<!--                    </li>-->
<!--                	<li class="dropdown-submenu">-->
<!--                    <a href="#">--><?php //echo $this->translate('商品属性'); ?><!--</a>-->
<!--                    	<ul class="dropdown-menu">-->
<!--                        	<li><a href="--><?php //echo $this->url('attribute/default'); ?><!--">--><?php //echo $this->translate('属性'); ?><!--</a></li>-->
<!--                            <li><a href="--><?php //echo $this->url('attribute/default',array('action'=>'attributeGroup')); ?><!--">--><?php //echo $this->translate('属性分组'); ?><!--</a></li>-->
<!--                        </ul>-->
<!--                    </li>-->
<!--                    <li><a href="--><?php //echo $this->url('brand/default',array('controller'=>'brand')); ?><!--">--><?php //echo $this->translate('商品品牌'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('comment/default',array('controller'=>'comment')); ?><!--">--><?php //echo $this->translate('商品评价'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('ask/default'); ?><!--">--><?php //echo $this->translate('商品咨询'); ?><!--</a></li>-->
<!--                	<li class="dropdown-submenu">-->
<!--                    <a href="#">--><?php //echo $this->translate('商品标签'); ?><!--</a>-->
<!--                    	<ul class="dropdown-menu">-->
<!--                            <li><a href="--><?php //echo $this->url('tag/default',array('controller'=>'tag', 'action'=>'tagGroup')); ?><!--">--><?php //echo $this->translate('商品标签分组'); ?><!--</a></li>-->
<!--                        	<li><a href="--><?php //echo $this->url('tag/default',array('controller'=>'tag')); ?><!--">--><?php //echo $this->translate('普通商品标签'); ?><!--</a></li>-->
<!--                        	<li><a href="--><?php //echo $this->url('tag/default',array('controller'=>'tag', 'action'=>'specTag')); ?><!--">--><?php //echo $this->translate('特定商品标签'); ?><!--</a></li>-->
<!--                        </ul>-->
<!--                    </li>-->
<!--                    <li><a href="--><?php //echo $this->url('goods/default', array('action'=>'goodsIndex')); ?><!--">--><?php //echo $this->translate('商品索引'); ?><!--</a></li>-->
<!--                    --><?php
//                    //位于商品管理的扩展插件
//                    if(isset($extendAppUrlArray['adminGoods']) and !empty($extendAppUrlArray['adminGoods'])) {
//                        foreach($extendAppUrlArray['adminGoods'] as $adminGoodsValue) {
//                            if(isset($adminGoodsValue['sub']) and !empty($adminGoodsValue['sub'])) {
//                                ?>
<!--                                <li class="dropdown-submenu">-->
<!--                                    <a href="#">--><?php //echo $adminGoodsValue['name']; ?><!--</a>-->
<!--                                    <ul class="dropdown-menu">-->
<!--                                        --><?php //foreach($adminGoodsValue['sub'] as $subadminGoods) { ?>
<!--                                            <li><a href="--><?php //echo $extendAppUrlPath . $subadminGoods['url']; ?><!--">--><?php //echo $subadminGoods['name']; ?><!--</a></li>-->
<!--                                        --><?php //} ?>
<!--                                    </ul>-->
<!--                                </li>-->
<!--                            --><?php //} else { ?>
<!--                                <li><a href="--><?php //echo $extendAppUrlPath . $adminGoodsValue['url']; ?><!--">--><?php //echo $adminGoodsValue['name']; ?><!--</a></li>-->
<!--                                --><?php
//                            }
//                            ?>
<!--                        --><?php //} } ?>
<!--                </ul>-->
<!--            </li>-->
            <li class="dropdown <?php if($this->myviewalias()->returnNamespace() == 'Goodsetutor\Controller'  and !in_array($this->myviewalias()->returnControllername(),array('Goodsetutor\Controller\Coupon', 'Goodsetutor\Controller\Promotions'))) echo 'active'; ?>"><a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo $this->translate('商品管理'); ?> <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li><a href="<?php echo $this->url('goodsetutor/default',array('controller'=>'goods')); ?>"><?php echo $this->translate('管理商品'); ?></a></li>
                    <li class="dropdown-submenu">
                        <a href="#"><?php echo $this->translate('管理分类'); ?></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url('classetutor/default',array('controller'=>'class')); ?>"><?php echo $this->translate('商品分类'); ?></a></li>
<!--                            <li><a href="--><?php //echo $this->url('classetutor/default', array('controller'=>'class', 'action'=>'frontSide')); ?><!--">--><?php //echo $this->translate('前台侧边设置'); ?><!--</a></li>-->
                        </ul>
                    </li>
<!--                    <li class="dropdown-submenu">-->
<!--                        <a href="#">--><?php //echo $this->translate('商品属性'); ?><!--</a>-->
<!--                        <ul class="dropdown-menu">-->
<!--                            <li><a href="--><?php //echo $this->url('attributeetutor/default'); ?><!--">--><?php //echo $this->translate('属性'); ?><!--</a></li>-->
<!--                            <li><a href="--><?php //echo $this->url('attributeetutor/default',array('action'=>'attributeGroup')); ?><!--">--><?php //echo $this->translate('属性分组'); ?><!--</a></li>-->
<!--                        </ul>-->
<!--                    </li>-->
<!--                    <li><a href="--><?php //echo $this->url('brandetutor/default',array('controller'=>'brand')); ?><!--">--><?php //echo $this->translate('商品品牌'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('commentetutor/default',array('controller'=>'comment')); ?><!--">--><?php //echo $this->translate('商品评价'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('asketutor/default'); ?><!--">--><?php //echo $this->translate('商品咨询'); ?><!--</a></li>-->
                    <li class="dropdown-submenu">
                        <a href="#"><?php echo $this->translate('商品标签'); ?></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url('tagetutor/default',array('controller'=>'tag', 'action'=>'tagGroup')); ?>"><?php echo $this->translate('商品标签分组'); ?></a></li>
                            <li><a href="<?php echo $this->url('tagetutor/default',array('controller'=>'tag')); ?>"><?php echo $this->translate('普通商品标签'); ?></a></li>
<!--                            <li><a href="--><?php //echo $this->url('tagetutor/default',array('controller'=>'tag', 'action'=>'specTag')); ?><!--">--><?php //echo $this->translate('特定商品标签'); ?><!--</a></li>-->
                        </ul>
                    </li>
<!--                    <li><a href="--><?php //echo $this->url('goodsetutor/default', array('action'=>'goodsIndex')); ?><!--">--><?php //echo $this->translate('商品索引'); ?><!--</a></li>-->
                    <?php
                    //位于商品管理的扩展插件
                    if(isset($extendAppUrlArray['adminGoods']) and !empty($extendAppUrlArray['adminGoods'])) {
                        foreach($extendAppUrlArray['adminGoods'] as $adminGoodsValue) {
                            if(isset($adminGoodsValue['sub']) and !empty($adminGoodsValue['sub'])) {
                                ?>
                                <li class="dropdown-submenu">
                                    <a href="#"><?php echo $adminGoodsValue['name']; ?></a>
                                    <ul class="dropdown-menu">
                                        <?php foreach($adminGoodsValue['sub'] as $subadminGoods) { ?>
                                            <li><a href="<?php echo $extendAppUrlPath . $subadminGoods['url']; ?>"><?php echo $subadminGoods['name']; ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?php echo $extendAppUrlPath . $adminGoodsValue['url']; ?>"><?php echo $adminGoodsValue['name']; ?></a></li>
                                <?php
                            }
                            ?>
                        <?php } } ?>
                </ul>
            </li>
<!--            <li class="dropdown --><?php //if($this->myviewalias()->returnNamespace() == 'User\Controller') echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('客户管理'); ?><!-- <b class="caret"></b></a>-->
            	<ul class="dropdown-menu">
                	<li><a href="<?php echo $this->url('user/default',array('controller'=>'user')); ?>"><?php echo $this->translate('管理客户'); ?></a></li>
                    <li><a href="<?php echo $this->url('user/default',array('controller'=>'user', 'action'=>'userRegExtend')); ?>"><?php echo $this->translate('客户扩展信息'); ?></a></li>
                    <li><a href="<?php echo $this->url('usergroup/default',array('controller'=>'usergroup')); ?>"><?php echo $this->translate('管理客户组'); ?></a></li>
                    <li class="dropdown-submenu">
                        <a href="#"><?php echo $this->translate('客户余额'); ?></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url('usermoney/default',array('action'=>'paycheck')); ?>"><?php echo $this->translate('充值记录'); ?></a></li>
                            <li><a href="<?php echo $this->url('usermoney/default',array('action'=>'withdraw')); ?>"><?php echo $this->translate('提现申请'); ?></a></li>
                            <li><a href="<?php echo $this->url('usermoney/default',array('action'=>'index')); ?>"><?php echo $this->translate('余额记录'); ?></a></li>
                        </ul>
                    </li>
                    <li class="dropdown-submenu">
                    <a href="#"><?php echo $this->translate('管理积分'); ?></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url('integral/default',array('action'=>'integralType')); ?>"><?php echo $this->translate('积分类型'); ?></a></li>
                            <li><a href="<?php echo $this->url('integral/default',array('action'=>'integrallog')); ?>"><?php echo $this->translate('积分历史记录'); ?></a></li>
                            <li><a href="<?php echo $this->url('integral/default',array('action'=>'integralRule')); ?>"><?php echo $this->translate('积分规则'); ?></a></li>
                        </ul>                    
                    </li>
                    <?php
                    //位于客户管理的扩展插件
                    if(isset($extendAppUrlArray['adminUser']) and !empty($extendAppUrlArray['adminUser'])) {
                        foreach($extendAppUrlArray['adminUser'] as $adminUserValue) {
                            if(isset($adminUserValue['sub']) and !empty($adminUserValue['sub'])) {
                                ?>
                                <li class="dropdown-submenu">
                                    <a href="#"><?php echo $adminUserValue['name']; ?></a>
                                    <ul class="dropdown-menu">
                                        <?php foreach($adminUserValue['sub'] as $subAdminUser) { ?>
                                            <li><a href="<?php echo $extendAppUrlPath . $subAdminUser['url']; ?>"><?php echo $subAdminUser['name']; ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?php echo $extendAppUrlPath . $adminUserValue['url']; ?>"><?php echo $adminUserValue['name']; ?></a></li>
                                <?php
                            }
                            ?>
                        <?php } } ?>
                    <!-- <li><a href="<?php echo $this->url('userintegration/default'); ?>"><?php echo $this->translate('管理整合'); ?></a></li> -->
                </ul>            
            </li>
<!--            <li class="dropdown --><?php //if($this->myviewalias()->returnNamespace() == 'Cms\Controller') echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('CMS管理'); ?><!-- <b class="caret"></b></a>-->
             	<ul class="dropdown-menu">
                	<li><a href="<?php echo $this->url('cms/default', array('controller'=>'Cms')); ?>"><?php echo $this->translate('管理文章'); ?></a></li>
                    <li><a href="<?php echo $this->url('cms/default', array('controller'=>'Class')); ?>"><?php echo $this->translate('管理文章分类'); ?></a></li>
                    <li><a href="<?php echo $this->url('cms/default', array('controller'=>'Cms', 'action'=>'singleArticle')); ?>"><?php echo $this->translate('管理单页文章'); ?></a></li>
                    <?php
                    //位于CMS管理的扩展插件
                    if(isset($extendAppUrlArray['adminCms']) and !empty($extendAppUrlArray['adminCms'])) {
                        foreach($extendAppUrlArray['adminCms'] as $adminCmsValue) {
                            if(isset($adminCmsValue['sub']) and !empty($adminCmsValue['sub'])) {
                                ?>
                                <li class="dropdown-submenu">
                                    <a href="#"><?php echo $adminCmsValue['name']; ?></a>
                                    <ul class="dropdown-menu">
                                        <?php foreach($adminCmsValue['sub'] as $subadminCms) { ?>
                                            <li><a href="<?php echo $extendAppUrlPath . $subadminCms['url']; ?>"><?php echo $subadminCms['name']; ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?php echo $extendAppUrlPath . $adminCmsValue['url']; ?>"><?php echo $adminCmsValue['name']; ?></a></li>
                                <?php
                            }
                            ?>
                        <?php } } ?>
                </ul>
            </li>
            <li class="dropdown <?php if($this->myviewalias()->returnNamespace() == 'Imagetext\Controller') echo 'active'; ?>"><a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo $this->translate('信息发布'); ?> <b class="caret"></b></a>
                <ul class="dropdown-menu">
                    <li><a href="<?php echo $this->url('Imagetext/default', array('controller'=>'Imagetext')); ?>"><?php echo $this->translate('管理图文'); ?></a></li>
                    <li><a href="<?php echo $this->url('Imagetext/default', array('controller'=>'Class')); ?>"><?php echo $this->translate('管理图文分类'); ?></a></li>
                    <!--                    <li><a href="--><?php //echo $this->url('cms/default', array('controller'=>'Cms', 'action'=>'singleArticle')); ?><!--">--><?php //echo $this->translate('管理单页文章'); ?><!--</a></li>-->
                    <?php
                    //位于CMS管理的扩展插件
                    if(isset($extendAppUrlArray['adminCms']) and !empty($extendAppUrlArray['adminCms'])) {
                        foreach($extendAppUrlArray['adminCms'] as $adminCmsValue) {
                            if(isset($adminCmsValue['sub']) and !empty($adminCmsValue['sub'])) {
                                ?>
                                <li class="dropdown-submenu">
                                    <a href="#"><?php echo $adminCmsValue['name']; ?></a>
                                    <ul class="dropdown-menu">
                                        <?php foreach($adminCmsValue['sub'] as $subadminCms) { ?>
                                            <li><a href="<?php echo $extendAppUrlPath . $subadminCms['url']; ?>"><?php echo $subadminCms['name']; ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?php echo $extendAppUrlPath . $adminCmsValue['url']; ?>"><?php echo $adminCmsValue['name']; ?></a></li>
                                <?php
                            }
                            ?>
                        <?php } } ?>
                </ul>
            </li>
<!--            <li class="dropdown --><?php //if(in_array($this->myviewalias()->returnNamespace(), array('Navigation\Controller', 'Links\Controller', 'Upload\Controller', 'Email\Controller', 'Ad\Controller', 'Dbsql\Controller', 'Operlog\Controller', 'Errorlog\Controller'))) echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('工具管理'); ?><!-- <b class="caret"></b></a>-->
             	<ul class="dropdown-menu">
             	    <li><a href="<?php echo $this->url('navigation/default'); ?>"><?php echo $this->translate('导航设置'); ?></a></li>
                	<li><a href="<?php echo $this->url('links/default'); ?>"><?php echo $this->translate('友情链接'); ?></a></li>
                    <li><a href="<?php echo $this->url('email/default'); ?>"><?php echo $this->translate('邮件发送'); ?></a></li>
                    <li class="dropdown-submenu">
                        <a href="#"><?php echo $this->translate('广告管理'); ?></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url('ad/default'); ?>"><?php echo $this->translate('电脑端广告(PC)'); ?></a></li>
                            <li><a href="<?php echo $this->url('ad/default',array('action'=>'mobileIndex')); ?>"><?php echo $this->translate('手机端广告(Phone)'); ?></a></li>
                        </ul>
                    </li>
                    <li><a href="<?php echo $this->url('dbsql/default'); ?>"><?php echo $this->translate('数据库备份'); ?></a></li>
                    <li><a href="<?php echo $this->url('operlog/default'); ?>"><?php echo $this->translate('操作日志'); ?></a></li>
                    <?php
                        //位于工具管理的扩展插件
                        if(isset($extendAppUrlArray['adminTools']) and !empty($extendAppUrlArray['adminTools'])) {
                            foreach($extendAppUrlArray['adminTools'] as $adminToolsValue) {
                                if(isset($adminToolsValue['sub']) and !empty($adminToolsValue['sub'])) {
                                    ?>
                                    <li class="dropdown-submenu">
                                        <a href="#"><?php echo $adminToolsValue['name']; ?></a>
                                        <ul class="dropdown-menu">
                                            <?php foreach($adminToolsValue['sub'] as $subadminTools) { ?>
                                                <li><a href="<?php echo $extendAppUrlPath . $subadminTools['url']; ?>"><?php echo $subadminTools['name']; ?></a></li>
                                            <?php } ?>
                                        </ul>
                                    </li>
                                <?php } else { ?>
                                    <li><a href="<?php echo $extendAppUrlPath . $adminToolsValue['url']; ?>"><?php echo $adminToolsValue['name']; ?></a></li>
                                    <?php
                                }
                                ?>
                    <?php } } ?>
                    <!-- <li><a href="<?php echo $this->url('errorlog/default'); ?>"><?php echo $this->translate('错误日志'); ?></a></li> -->
                </ul>             
            </li>
<!--            <li class="dropdown --><?php //if(in_array($this->myviewalias()->returnNamespace(), array('Theme\Controller')) or in_array($this->myviewalias()->returnControllername(),array('Goods\Controller\Coupon', 'Goods\Controller\Promotions'))) echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('运营管理'); ?><!-- <b class="caret"></b></a>-->
                <ul class="dropdown-menu">
                    <li><a href="<?php echo $this->url('promotions/default'); ?>"><?php echo $this->translate('优惠促销规则'); ?></a></li>
                    <li><a href="<?php echo $this->url('coupon/default'); ?>"><?php echo $this->translate('优惠券'); ?></a></li>
                    <li class="dropdown-submenu">
                        <a href="#"><?php echo $this->translate('专题管理'); ?></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url('admintheme/default'); ?>"><?php echo $this->translate('专题设置'); ?></a></li>
                            <!--<li><a href="<?php echo $this->url('admintheme/default',array('action'=>'template')); ?>"><?php echo $this->translate('专题模板'); ?></a></li-->
                        </ul>
                    </li>
                    <?php
                    //位于运营管理的扩展插件
                    if(isset($extendAppUrlArray['adminOperate']) and !empty($extendAppUrlArray['adminOperate'])) {
                        foreach($extendAppUrlArray['adminOperate'] as $adminOperateValue) {
                            if(isset($adminOperateValue['sub']) and !empty($adminOperateValue['sub'])) {
                                ?>
                                <li class="dropdown-submenu">
                                    <a href="#"><?php echo $adminOperateValue['name']; ?></a>
                                    <ul class="dropdown-menu">
                                        <?php foreach($adminOperateValue['sub'] as $subadminOperate) { ?>
                                            <li><a href="<?php echo $extendAppUrlPath . $subadminOperate['url']; ?>"><?php echo $subadminOperate['name']; ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?php echo $extendAppUrlPath . $adminOperateValue['url']; ?>"><?php echo $adminOperateValue['name']; ?></a></li>
                                <?php
                            }
                            ?>
                        <?php } } ?>
                </ul>
            </li>
<!--            <li class="dropdown --><?php //if(in_array($this->myviewalias()->returnNamespace(),array('Region\Controller','System\Controller','Package\Controller', 'Express\Controller', 'Payment\Controller', 'Currency\Controller', 'Template\Controller')) or in_array($this->myviewalias()->returnControllername(),array('Admin\Controller\Admin', 'Orders\Controller\State', 'Stock\Controller\State'))) echo 'active'; ?><!--"><a data-toggle="dropdown" class="dropdown-toggle" href="#">--><?php //echo $this->translate('系统管理'); ?><!-- <b class="caret"></b></a>-->
<!--             	<ul class="dropdown-menu">-->
<!--                	<li><a href="--><?php //echo $this->url('system/default',array('controller'=>'system')); ?><!--">--><?php //echo $this->translate('系统设置'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('optimization/default',array('controller'=>'optimization', 'action'=>'index')); ?><!--">--><?php //echo $this->translate('性能优化'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('system/default',array('controller'=>'system', 'action'=>'uploadset')); ?><!--">--><?php //echo $this->translate('附件设置'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('system/default',array('controller'=>'system', 'action'=>'userset')); ?><!--">--><?php //echo $this->translate('客户设置'); ?><!--</a></li>-->
<!--                    <!--<li><a href="">--><?php //echo $this->translate('语言设置'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('currency/default',array('action'=>'index')); ?><!--">--><?php //echo $this->translate('货币设置'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('payment/default',array('action'=>'index')); ?><!--">--><?php //echo $this->translate('支付设置'); ?><!--</a></li>-->
<!--                    <li class="dropdown-submenu">-->
<!--                    <a href="#">--><?php //echo $this->translate('配送设置'); ?><!--</a>-->
<!--                        <ul class="dropdown-menu">-->
<!--                            <li><a href="--><?php //echo $this->url('express/default',array('action'=>'index')); ?><!--">--><?php //echo $this->translate('配送设置'); ?><!--</a></li>-->
<!--                            <li><a href="--><?php //echo $this->url('express/default',array('action'=>'expressapi')); ?><!--">--><?php //echo $this->translate('动态API'); ?><!--</a></li>-->
<!--                        </ul>-->
<!--                    </li>-->
<!--                    <li class="dropdown-submenu">-->
<!--                        <a href="#">--><?php //echo $this->translate('消息提醒设置'); ?><!--</a>-->
<!--                        <ul class="dropdown-menu">-->
<!--                            <li><a href="--><?php //echo $this->url('system/default',array('controller'=>'system', 'action'=>'phoneMessageSet')); ?><!--">--><?php //echo $this->translate('手机短信提醒设置'); ?><!--</a></li>-->
<!--                            <li><a href="--><?php //echo $this->url('system/default',array('controller'=>'system', 'action'=>'sendMessageSet')); ?><!--">--><?php //echo $this->translate('电子邮件提醒设置'); ?><!--</a></li>-->
<!--                        </ul>-->
<!--                    </li>-->
<!--                    <li><a href="--><?php //echo $this->url('region/default',array('controller'=>'region')); ?><!--">--><?php //echo $this->translate('地区管理'); ?><!--</a></li>-->
<!--                	<li class="dropdown-submenu">-->
<!--                	<a href="#">--><?php //echo $this->translate('状态设置'); ?><!--</a>-->
<!--                	   <ul class="dropdown-menu">-->
<!--                	       <li><a href="--><?php //echo $this->url('stock_state/default'); ?><!--">--><?php //echo $this->translate('库存状态'); ?><!--</a></li>-->
<!--                	   </ul>-->
<!--                	</li>-->
<!--                	<li class="dropdown-submenu">-->
<!--                    <a href="#">--><?php //echo $this->translate('管理员设置'); ?><!--</a>-->
<!--                    	<ul class="dropdown-menu">-->
<!--                        	<li><a href="--><?php //echo $this->url('admin/default',array('action'=>'administrator')); ?><!--">--><?php //echo $this->translate('管理员'); ?><!--</a></li>-->
<!--                            <li><a href="--><?php //echo $this->url('admin/default',array('action'=>'admingroup')); ?><!--">--><?php //echo $this->translate('管理员组'); ?><!--</a></li>-->
<!--                        </ul>-->
<!--                    </li>-->
<!--                	<li class="dropdown-submenu">-->
<!--                	<a href="#">--><?php //echo $this->translate('在线客服设置'); ?><!--</a>-->
<!--                	   <ul class="dropdown-menu">-->
<!--                           <li><a href="--><?php //echo $this->url('online/default', array('action'=>'onlineStyle')); ?><!--">--><?php //echo $this->translate('客服样式设置'); ?><!--</a></li>-->
<!--                           <li><a href="--><?php //echo $this->url('online/default', array('action'=>'group')); ?><!--">--><?php //echo $this->translate('在线客服分组'); ?><!--</a></li>-->
<!--                           <li><a href="--><?php //echo $this->url('online/default'); ?><!--">--><?php //echo $this->translate('在线客服成员'); ?><!--</a></li>-->
<!--                	   </ul>-->
<!--                	</li>-->
<!--                	<li><a href="--><?php //echo $this->url('template/default'); ?><!--">--><?php //echo $this->translate('模板管理'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('package/default',array('action'=>'index')); ?><!--">--><?php //echo $this->translate('系统更新'); ?><!--</a></li>-->
<!--                    <li><a href="--><?php //echo $this->url('plugin/default'); ?><!--">--><?php //echo $this->translate('插件市场'); ?><!--</a></li>-->
<!--                    --><?php
//                    //位于系统管理的扩展插件
//                    if(isset($extendAppUrlArray['adminSystem']) and !empty($extendAppUrlArray['adminSystem'])) {
//                        foreach($extendAppUrlArray['adminSystem'] as $adminSystemValue) {
//                            if(isset($adminSystemValue['sub']) and !empty($adminSystemValue['sub'])) {
//                                ?>
<!--                                <li class="dropdown-submenu">-->
<!--                                    <a href="#">--><?php //echo $adminSystemValue['name']; ?><!--</a>-->
<!--                                    <ul class="dropdown-menu">-->
<!--                                        --><?php //foreach($adminSystemValue['sub'] as $subadminSystem) { ?>
<!--                                            <li><a href="--><?php //echo $extendAppUrlPath . $subadminSystem['url']; ?><!--">--><?php //echo $subadminSystem['name']; ?><!--</a></li>-->
<!--                                        --><?php //} ?>
<!--                                    </ul>-->
<!--                                </li>-->
<!--                            --><?php //} else { ?>
<!--                                <li><a href="--><?php //echo $extendAppUrlPath . $adminSystemValue['url']; ?><!--">--><?php //echo $adminSystemValue['name']; ?><!--</a></li>-->
<!--                                --><?php
//                            }
//                            ?>
<!--                        --><?php //} } ?>
<!--                </ul>-->
<!--            </li>-->
            <li class="dropdown <?php if(in_array($this->myviewalias()->returnNamespace(),array('Region\Controller','Systemextend\Controller','Package\Controller', 'Express\Controller', 'Payment\Controller', 'Currency\Controller', 'Template\Controller')) or in_array($this->myviewalias()->returnControllername(),array('Admin\Controller\Admin', 'Orders\Controller\State', 'Stock\Controller\State'))) echo 'active'; ?>"><a data-toggle="dropdown" class="dropdown-toggle" href="#"><?php echo $this->translate('管理员设置'); ?> <b class="caret"></b></a>
                <ul class="dropdown-menu">
<!--                    <li><a href="--><?php //echo $this->url('Systemextend/default',array('controller'=>'Systemextend')); ?><!--">--><?php //echo $this->translate('系统设置'); ?><!--</a></li>-->
<!--                        <li><a href="--><?php //echo $this->url('admin/default',array('action'=>'administrator')); ?><!--">--><?php //echo $this->translate('系统设置'); ?><!--</a></li>-->

<!--                    <li><a href="--><?php //echo $this->url('Systemextend/default',array('controller'=>'Systemextend', 'action'=>'uploadset')); ?><!--">--><?php //echo $this->translate('附件设置'); ?><!--</a></li>-->

                    <li class="dropdown-submenu">
                        <a href="#"><?php echo $this->translate('权限管理'); ?></a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php echo $this->url('adminetutor/default',array('action'=>'administrator')); ?>"><?php echo $this->translate('管理员'); ?></a></li>
                            <li><a href="<?php echo $this->url('adminetutor/default',array('action'=>'admingroup')); ?>"><?php echo $this->translate('管理员组'); ?></a></li>
                        </ul>
                    </li>

<!--                    <li><a href="--><?php //echo $this->url('plugin/default'); ?><!--">--><?php //echo $this->translate('插件市场'); ?><!--</a></li>-->
                    <?php
                    //位于系统管理的扩展插件
                    if(isset($extendAppUrlArray['adminSystem']) and !empty($extendAppUrlArray['adminSystem'])) {
                        foreach($extendAppUrlArray['adminSystem'] as $adminSystemValue) {
                            if(isset($adminSystemValue['sub']) and !empty($adminSystemValue['sub'])) {
                                ?>
                                <li class="dropdown-submenu">
                                    <a href="#"><?php echo $adminSystemValue['name']; ?></a>
                                    <ul class="dropdown-menu">
                                        <?php foreach($adminSystemValue['sub'] as $subadminSystem) { ?>
                                            <li><a href="<?php echo $extendAppUrlPath . $subadminSystem['url']; ?>"><?php echo $subadminSystem['name']; ?></a></li>
                                        <?php } ?>
                                    </ul>
                                </li>
                            <?php } else { ?>
                                <li><a href="<?php echo $extendAppUrlPath . $adminSystemValue['url']; ?>"><?php echo $adminSystemValue['name']; ?></a></li>
                                <?php
                            }
                            ?>
                        <?php } } ?>
                </ul>
            </li>
        </ul>
        <ul class="nav pull-right">
        	<li class="<?php if($this->myviewalias()->returnControllername() == 'Adminetutor\Controller\Home') echo 'active'; ?>" ><a href="<?php echo $this->url('adminHomeetutor/default',array('action'=>'index','controller'=>'home')); ?>"><?php echo $this->translate('后台首页'); ?></a></li>
            <li class="divider-vertical"></li>
            <li><a href="<?php echo $this->url('shopfront/default'); ?>" target="_blank" style=" padding:10px 1px;"><?php echo $this->translate('前台首页'); ?></a></li>
        </ul>
    </div>
</div>
<div class="row-fluid">
	<div class="span12">
    	<div class="well" style="background: #FFF;padding:0px 15px 12px 15px;">
    	<!--<p style="margin:3px 0 0 0;" class="pull-left"><i class="icon-ban-circle"></i>--><!-- <i class="icon-volume-up"></i> --><?php /*echo $this->translate('暂无新消息'); */?><!--</p>-->
        <p style="margin:3px 0 0 0;" class="pull-right"><?php echo $this->myviewalias()->returnAuth('admin_group_name'); ?>：<a href="<?php echo $this->url('adminetutor/default/admin_id',array('action'=>'adminedit','controller'=>'admin','admin_id'=>$this->myviewalias()->returnAuth('admin_id'))); ?>"><?php echo $this->myviewalias()->returnAuth('admin_name'); ?></a>&nbsp;&nbsp;<?php $weekArray=array(1=>$this->translate('星期一'), 2=>$this->translate('星期二'), 3=>$this->translate('星期三'), 4=>$this->translate('星期四'), 5=>$this->translate('星期五'), 6=>$this->translate('星期六'), 0=>$this->translate('星期日')); $timeStr = time(); echo date("Y-m-d", $timeStr).' '.$weekArray[date("w", $timeStr)]; ?>
            <?php if(defined('FRONT_CACHE_STATE') and FRONT_CACHE_STATE == 'true') { ?>
            &nbsp;&nbsp;<a href="javascript:;" onclick="clear_front_cache();" class="btn btn-small btn-primary"><i class="icon-trash icon-white"></i> <?php echo $this->translate('缓存清理'); ?></a>
            <?php } ?>
            &nbsp;&nbsp;<a href="<?php echo $this->url('adminetutor/default',array('action'=>'loginout','controller'=>'index')); ?>" class="btn btn-small btn-danger"><i class="icon-off icon-white"></i> <?php echo $this->translate('退出系统'); ?></a>
        </p>
        <?php if(defined('FRONT_CACHE_STATE') and FRONT_CACHE_STATE == 'true') { ?>
        <script>
            $(function () {
                alert("administrator_header");
            })
            function clear_front_cache() {
                $.post("<?php echo $this->url('optimization/default',array('controller'=>'optimization', 'action'=>'clearFrontCache')); ?>",'',
                    function(data){
                        if(data == 'true') {
                            alert('<?php echo $this->translate('缓存清理完毕！'); ?>');
                        } else {
                            alert('<?php echo $this->translate('缓存清理失败！'); ?>');
                        }
                    });
            }
        </script>
        <?php } ?>
        </div>
        <div  class="admin_body">